<template>
  <view class="blog-no-data-root">
    <view class="blog-no-data-main" v-if="show">
      <image src="../../static/no-data.png" style="width: 60px;height: 60px;"/>
      <text>{{ title || "暂无数据，下拉刷新" }}</text>
    </view>
    <template v-else>
      <slot></slot>
    </template>
  </view>
</template>

<script>
export default {
  props: {
    show: {
      type: Boolean,
      default: false
    },
    title: {
      type: String
    }
  }
}
</script>

<style lang="scss">
@import "@/uni.scss";

.blog-no-data-root {
  height: 100%;
}

.blog-no-data-main {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: $uni-text-color-disable;
  gap: 10px;
}

.blog-no-data-icon {
  font-size: 70px;
}

</style>
